package com.api.tournament.dao;

import com.api.core.ApiMapper;
import com.api.tournament.model.Tournament;
import com.api.tournament.model.TournamentTeamUser;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface TournamentTeamUserMapper extends ApiMapper<TournamentTeamUser> {
    TournamentTeamUser selectByUidAndTournamentId(Long  userId, Long tournamentId);

    void checkIn(TournamentTeamUser user);

    List<Map<String, Object>> groupByState();

    List<TournamentTeamUser> selectByTeamIdAndTournamentId(Long teamId, Long tournamentId);

    void deleteByTournamentIdAndUserId(Long tournamentTeamId, Long userId);

    TournamentTeamUser selectByUidAndTournamentIdAndTournameTeamId(long userId, Long tournamentId, Long tournamentUserId);
}